import React, {} from 'react';
import { Descriptions, Modal,} from 'antd';



import styles from '../../../device/list/index.less';
export interface DetailFormProps {
  onCancel: () => void;
  updateModalVisible: boolean;
  values: API.AreaItem;
}


const UpdateForm: React.FC<DetailFormProps> = (props) => {
 
  const { updateModalVisible,  onCancel,values} = props;
  return (
    <Modal
      width={640}
      destroyOnClose
      title="区域详情"
      className={styles.deviceform}
      visible={updateModalVisible}
      onCancel={() => onCancel()}
    >
        <Descriptions  column={1} >
          <Descriptions.Item label="区域名称">{values.areaName}</Descriptions.Item>
          <Descriptions.Item label="区域描述">{values.areaDesc}</Descriptions.Item>
          <Descriptions.Item label="上级区域名称">{values.parentName}</Descriptions.Item>
          <Descriptions.Item label="启用状态">{values.useState==1?'启用':'未启用'}</Descriptions.Item>
          <Descriptions.Item label="创建时间">{values.createTime}</Descriptions.Item>
          <Descriptions.Item label="更新时间">{values.updateTime}</Descriptions.Item>
        </Descriptions>,
    </Modal>
  );
};

export default UpdateForm;
